package com.gaohe.scp.service.impl;

import java.util.List;
import com.gaohe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.scp.mapper.CsCarAssessMapper;
import com.gaohe.scp.domain.CsCarAssess;
import com.gaohe.scp.service.ICsCarAssessService;

/**
 * 车辆评估Service业务层处理
 * 
 * @author liuxiangyu
 * @date 2025-03-25
 */
@Service
public class CsCarAssessServiceImpl implements ICsCarAssessService 
{
    @Autowired
    private CsCarAssessMapper csCarAssessMapper;

    @Override
    public List<CsCarAssess> selectCsCarAssessByCarId(Long carId)
    {
        return csCarAssessMapper.selectCsCarAssessByCarId(carId);
    }

    /**
     * 查询车辆评估
     * 
     * @param assessId 车辆评估主键
     * @return 车辆评估
     */
    @Override
    public CsCarAssess selectCsCarAssessByAssessId(Long assessId)
    {
        return csCarAssessMapper.selectCsCarAssessByAssessId(assessId);
    }

    /**
     * 查询车辆评估列表
     * 
     * @param csCarAssess 车辆评估
     * @return 车辆评估
     */
    @Override
    public List<CsCarAssess> selectCsCarAssessList(CsCarAssess csCarAssess)
    {
        return csCarAssessMapper.selectCsCarAssessList(csCarAssess);
    }

    /**
     * 新增车辆评估
     * 
     * @param csCarAssess 车辆评估
     * @return 结果
     */
    @Override
    public int insertCsCarAssess(CsCarAssess csCarAssess)
    {
        csCarAssess.setCreateTime(DateUtils.getNowDate());
        return csCarAssessMapper.insertCsCarAssess(csCarAssess);
    }

    /**
     * 修改车辆评估
     * 
     * @param csCarAssess 车辆评估
     * @return 结果
     */
    @Override
    public int updateCsCarAssess(CsCarAssess csCarAssess)
    {
        csCarAssess.setUpdateTime(DateUtils.getNowDate());
        return csCarAssessMapper.updateCsCarAssess(csCarAssess);
    }

    /**
     * 批量删除车辆评估
     * 
     * @param assessIds 需要删除的车辆评估主键
     * @return 结果
     */
    @Override
    public int deleteCsCarAssessByAssessIds(Long[] assessIds)
    {
        return csCarAssessMapper.deleteCsCarAssessByAssessIds(assessIds);
    }

    /**
     * 删除车辆评估信息
     * 
     * @param assessId 车辆评估主键
     * @return 结果
     */
    @Override
    public int deleteCsCarAssessByAssessId(Long assessId)
    {
        return csCarAssessMapper.deleteCsCarAssessByAssessId(assessId);
    }
}
